{template Public:Page:header}
<div class="container">
  <div class="row">
  
    {template Member:Index:sidebar}
    
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
           <div class="well">
           <h3>提现支付宝帐号设置</h3>
           <div class="alert alert-info fade in">
                <button data-dismiss="alert" class="close">
                    ×
                </button>
                <i class="fa-fw fa fa-info"></i>
                <strong>提示</strong> 设置后可以使用该帐号提现
            </div>
 			
            <form id="PayForm">
           <div class="row">
          <div class="col-lg-2">
          <h4>支付宝帐号</h4>
          </div>
           <div class="col-lg-3">
           <input type="text" name="bankcard" id="Bankcard" class="form-control" value=""/>
            </div>
             <div class="col-lg-2">
              <button class="btn btn-azure" type="submit">提交</button>
             </div>
		  </div>
          </form>
          
          {if $member['bankcard']}
          <br />
          <h4>已设置帐号： ***{echo substr($member['bankcard'],3)} </h4>
          {/if}
           </div>
    </div>
  </div>
</div>
</div>


<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<script type="text/javascript">
$(function(){ 
	$('#PayForm').bootstrapValidator({
		excluded: [':disabled'],
		feedbackIcons: {
			valid: 'glyphicon glyphicon-ok',
			invalid: 'glyphicon glyphicon-remove',
			validating: 'glyphicon glyphicon-refresh'
		},
		fields: {
			bankcard: {
				validators: {
					notEmpty: {
						message: '帐号不能为空！'
					}
					/*,
					emailAddress: {
						message: '邮箱帐号格式有误！'
					}
					*/
				}
			}
			
		},
		submitHandler: function (form) {

		  $.post('/post/member/bankcard',$("#PayForm").serialize(), function(json) {
			
				$('.bootbox').PhpappProgress({json:json});

				return true;
			
		  }, 'json');

		 bootbox.dialog({
			 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
			 title: '<i class="icon fa fa-retweet"></i> 提交中',
			 closeButton: false
		 }).PhpappProgress({time:5000});
	 
		  return false; 
		 
		} 
	}) 			
	 
});	
</script>

{template Public:Page:footer}